from flask import Flask, render_template, request

app = Flask(__name__)

@app.route("/")
def home():
    return render_template("index.html")


@app.route("/index",methods=["GET","POST"])
def index():
    # 请求头
    account :str = request.args.get("account")
    pwd :str = request.args.get("pwd")

    # 请求体 form-data
    print(request.form)
    # 请求体 json
    print(request.json)

    return request.args


if __name__ == "__main__":
    app.run(
        host="127.0.0.1",
        port=8080,
        debug=True    #热加载
    )